<!DOCTYPE html>
<html>
<head>
    <title>MyHtml.html</title>

    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="this is my page">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">

    <script type="text/javascript" src="/js/jquery-1.4.2.min.js"></script>
    <script type="text/javascript">
        $(function() {
            // GET按钮请求
            $("#getBtn").click(function() {
                var requestURL = "/demo/user/list";
                $.ajax({
                    type : "GET",
                    url : requestURL,
                    async : false,
                    cache : false,
                    success : function(resultData, textStatus) {
                        alert(textStatus);
                        alert(resultData);
                        alert(resultData.name);
                    }
                });
            });
        });
    </script>
</head>

<body>
<body>
<div align="center">
    <div id="getDiv" style="border: solid 1px blue;height:180px;width:600px;padding: 0px 0px 0px 20px;float: left;">
        <div align="center">
            <h3>访问REST GET服务</h3>
        </div>
        <div align="center">
            <input id="getBtn" value="GET" type="button">
            返回值：<input type="text" id="getText">
        </div>
    </div>

    <div id="postDiv" style="border: solid 1px blue;height:180px;width:600px;padding: 0px 0px 0px 20px;float: right;margin: auto;">
        <div align="center">
            <h3>访问REST POST服务</h3>
        </div>
        用户名：<input type="text" id="username" value="xx">
        密码：<input type="password" id="password" value="1233">  <br><br>
        地址：<input type="text" id="address" value="ss">
        联系方式：<input type="password" id="tel" value="1232333">   <br><br>
        <input id="postBtn" value="POST" type="button">
        返回值：<input type="text" id="postText">
    </div>

    <div id="putDiv" style="border: solid 1px blue;height:180px;width:600px;padding: 0px 0px 0px 20px;float: left;">
        <div align="center">
            <h3>访问REST PUT服务</h3>
        </div>
        用户名：<input type="text" id="putUserName" value="xx">
        密码： <input type="password" id="putPassWord" value="1233">  <br><br>
        地址：<input type="text" id="putAddress" value="ss">
        联系方式： <input type="password" id="putTel" value="1232333">   <br><br>
        <input value="PUT" type="button" id="putBtn">
        返回值：<input type="text" id="putText">
    </div>
    <div id="deleteDiv" style="border: solid 1px blue;height:180px;width:600px;padding: 0px 0px 0px 20px;float: right;">
        <div align="center">
            <h3>访问REST Delete服务</h3>
        </div>
        请输入：<input type="text" id="deleteParamVal">
        <input id="deleteBtn" value="Delete" type="button">
        返回值：<input type="text" id="deleteText">
    </div>
</div>
</body>
</body>
</html>